package com.acminds.acuteauto.persistence.entities;

// Generated May 13, 2012 8:21:43 PM by Hibernate Tools 3.4.0.CR1

import java.math.BigDecimal;
import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;

import com.acminds.acuteauto.persistence.dto.*;

/**
 * Residence generated by customhbm2java
 */
@MappedSuperclass
public abstract class AbstractResidence extends
		com.acminds.acuteauto.persistence.BaseDTO implements
		java.io.Serializable {

	private static final long serialVersionUID = 1L;

	private Integer residenceId;
	private Applicant applicant;
	private Location location;
	private int residenceType;
	private BigDecimal rentMorgAmount;
	private Integer totalYears;
	private Integer totalMonths;

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "RESIDENCE_ID", unique = true, nullable = false)
	public Integer getResidenceId() {
		return this.residenceId;
	}

	public void setResidenceId(Integer residenceId) {
		this.residenceId = residenceId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "APPLICANT_ID", nullable = false)
	public Applicant getApplicant() {
		return this.applicant;
	}

	public void setApplicant(Applicant applicant) {
		this.applicant = applicant;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "LOCATION_ID", nullable = false)
	public Location getLocation() {
		return this.location;
	}

	public void setLocation(Location location) {
		this.location = location;
	}

	@Column(name = "RESIDENCE_TYPE", nullable = false)
	public int getResidenceType() {
		return this.residenceType;
	}

	public void setResidenceType(int residenceType) {
		this.residenceType = residenceType;
	}

	@Column(name = "RENT_MORG_AMOUNT", precision = 8)
	public BigDecimal getRentMorgAmount() {
		return this.rentMorgAmount;
	}

	public void setRentMorgAmount(BigDecimal rentMorgAmount) {
		this.rentMorgAmount = rentMorgAmount;
	}

	@Column(name = "TOTAL_YEARS")
	public Integer getTotalYears() {
		return this.totalYears;
	}

	public void setTotalYears(Integer totalYears) {
		this.totalYears = totalYears;
	}

	@Column(name = "TOTAL_MONTHS")
	public Integer getTotalMonths() {
		return this.totalMonths;
	}

	public void setTotalMonths(Integer totalMonths) {
		this.totalMonths = totalMonths;
	}

}
